str = 'https://yys.res.netease.com/pc/zt/20170731172708/data/picture/4/9/640x960.jpg'
idx = str.rindex('picture')
print(idx)

print(str[54:str.rindex('/')].replace('/','_'))
